import Login from '../pages/Login/index.js';
import Register from '../pages/Register/index.js';
import BlogList from '../pages/BlogList/index.js';
import BlogEdit from '../pages/BlogEdit/index.js';
import BlogDetail from '../pages/BlogDetail/index.js';

// 前端路由
const routes = [
    // 添加 noLogin 属性，是为了表示不需要登录就能访问的页面
    { path: '/login', component: Login, noLogin: true },
    { path: '/register', component: Register, noLogin: true },
    { path: '/blog/list', component: BlogList },
    { path: '/blog/edit/:id', component: BlogEdit },
    { path: '/blogs/:id', component: BlogDetail },
];

export default routes;
